package com.yonyou.brigade.third_parties.yihao.util;

public enum TravelTypeEmun {
    PLAIN("飞机",0) , TRAIN("火车" , 1) , CAR("汽车" , 2) , OTHER("其他" , 3);
    private String name;
    private int index;

    private TravelTypeEmun(String name , int index){
        this.name = name;
        this.index=index;
    }

    public static int getIndexByName(String name){
        for(TravelTypeEmun travelTypeEmun:TravelTypeEmun.values()){
            if(travelTypeEmun.name.equals(name)){
                return travelTypeEmun.index;
            }
        }
        return -1;
    }
}
